import numpy as np
import matplotlib.pyplot as plt

# 输入数据
data = np.array([
    [18973, 16807, 17271, 23733, 28541, 28224, 26427, 28037, 32728, 33821],
    [18843, 16494, 17552, 24222, 28554, 28195, 25646, 28739, 33488, 33159],
    [18592, 16312, 17943, 25111, 28571, 27986, 26285, 29594, 34066, 33728],
    [18453, 16040, 18254, 25509, 28694, 27600, 26420, 30370, 34163, 33163],
    [18147, 16025, 18089, 25726, 28748, 28058, 26561, 30674, 34283, 32962],
    [17623, 16240, 18131, 25543, 29074, 28422, 26750, 31535, 35290, 32757],
    [17293, 16376, 18243, 26392, 29255, 28768, 26931, 31434, 35393, 32513],
    [17051, 16461, 18644, 27105, 29200, 28398, 27106, 31872, 35200, 32296],
    [16933, 16413, 19048, 27680, 29116, 28054, 27280, 31980, 34734, 32073],
    [16923, 16194, 20691, 28261, 29034, 27471, 27474, 31339, 34557, 31848],
    [16946, 16195, 21187, 28562, 28836, 27155, 27660, 31510, 34316, 31161],
    [16984, 16080, 21655, 28540, 28651, 27002, 27851, 31820, 34058, 31103]
])

# 将数据转置以便绘制
data = data.T

# 绘制图像
months = np.arange(1, 13)
for i in range(data.shape[0]):
    plt.plot(months, data[i], label=str(2014 + i))

plt.xlabel('Month')
plt.ylabel('yuan/square meter')
plt.title('Data from 2014 to 2023')
plt.legend(loc='upper right', ncol=2)  # 设置图例
plt.show()